require 'ball'
require 'board'

class Fling

  attr_accessor :board

  def initialize(board=Board.new([Ball.new(5,6), Ball.new(5,1), Ball.new(4,2), Ball.new(2,5), Ball.new(5, 4)]))
    @board=board
    @board.draw
  end
  
  def set_567
    @board = Board.new([Ball.new(0,4), Ball.new(1,7), Ball.new(3,1), Ball.new(3,7), Ball.new(5,5), Ball.new(6,2), Ball.new(6,6)])
    @board.draw
  end
  
  def set_current
    @board = Board.new([Ball.new(0,4), Ball.new(1,4), Ball.new(1,5), Ball.new(1,6), Ball.new(2,2), Ball.new(4,2), Ball.new(5,1), Ball.new(6,3), Ball.new(6,7)])
    @board.draw
  end
  
  def set_10_6
    @board = Board.new([Ball.new(0,2), Ball.new(2,4), Ball.new(6,0), Ball.new(6,2), Ball.new(6,5), Ball.new(6,6), Ball.new(6,7)])
    @board.draw
  end
  
  def set_10_5
    @board = Board.new([Ball.new(0,1), Ball.new(0,3), Ball.new(1,4), Ball.new(2,5), Ball.new(4,0), Ball.new(4,1), Ball.new(4,7)])
    @board.draw
  end

  def set_10_4
    @board = Board.new([Ball.new(0,3), Ball.new(0,4), Ball.new(1,6), Ball.new(4,7), Ball.new(5,6), Ball.new(6,0), Ball.new(6,5), Ball.new(6,6), Ball.new(6,7)])
    @board.draw
  end
  
  
  def set_double
    @board = Board.new([Ball.new(4,4), Ball.new(5,4), Ball.new(0, 4)])
  end
    
  def solve!
    @board.solve!
  end
  
  
  
  
end